package com.wx.datastructure.array;

/**
 * @author wx
 * @Description: 数组测试
 * @date 2018/12/7 000717:27
 */
public class ArrrayMain {
    public static void main(String[] agrs) {
        IArray<String> myArray = new MyArray<String>(3);
        myArray.addFirst("wx");
        myArray.addFirst("wx2");
        myArray.addFirst("wx3");
        myArray.addFirst("wx4");
        myArray.addLast("wx5");
        myArray.addFirst("wx6");
        myArray.add(6,"wx8");
        myArray.add(7,"ww8");
        myArray.add(8,"ww7");
        myArray.add(8,"ww7");
        myArray.set(6,"ww6");
        myArray.removeLast();
        myArray.removeLast();
        myArray.removeLast();
        myArray.removeLast();
        myArray.removeLast();
        myArray.removeLast();
        myArray.removeLast();
        System.out.println(myArray);
        System.out.println(myArray.capacity());
        System.out.println(myArray.isEmpty());
        System.out.println(myArray.size());
        System.out.println(myArray.get(9));
        System.out.println(myArray.contains("wx"));
        System.out.println(myArray.contains("ww8"));
        System.out.println(myArray.contains("wxx"));

    }
}
